package android.textIt.backend.model;

import android.database.Cursor;

public class Group extends Contact {

  private static final long serialVersionUID = 412351700219301683L;
  //1 == yes, 0 == no
  private int isTemporary; 
  
  public Group() {
  }

  
  public Group (long id){
    this.id = id;
  }
  public Group(String name, int isTemporary) {
    super();
    this.name = name;
    this.isTemporary = isTemporary;
  }

  public Group(int id, String name, int isTemporary) {
    super();
    this.id = id;
    this.name = name;
    this.isTemporary = isTemporary;
  }

  public Group(Cursor c) {
  	
    id = c.getLong(0);
    name = c.getString(1);
    isTemporary = c.getInt(2);
    reference_id = c.getLong(3);
  }

   /**
   * @return the isTemporary
   */
  public boolean getIsTemporary() {
    return isTemporary==1;
  }

  /**
   * @return the isTemporary
   */
  public int getTemporary() {
    return isTemporary;
  }

  /**
   * @param isTemporary the isTemporary to set
   */
  public void setIsTemporary(boolean isTemporary) {
    if(isTemporary)
      this.isTemporary=1;
    else
      this.isTemporary=0;
  }
}
